package com.feihua.starter.service.impl;

import com.feihua.starter.service.api.ApiHdbPvPoService;
import com.feihua.starter.service.mapper.HdbPvPoMapper;
import com.feihua.starter.service.modules.hdb.dto.HdbPvDto;
import com.feihua.starter.service.modules.hdb.dto.SearchHdbPvsConditionDto;
import com.feihua.starter.service.modules.hdb.po.HdbPvPo;
import com.github.pagehelper.Page;
import feihua.jdbc.api.pojo.PageResultDto;
import feihua.jdbc.api.service.impl.ApiBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * This class was generated by MyBatis Generator.
 * @author revolver 2018-06-29 22:26:31
 */
@Service
public class ApiHdbPvPoServiceImpl extends ApiBaseServiceImpl<HdbPvPo, HdbPvDto, String> implements ApiHdbPvPoService {
    @Autowired
    HdbPvPoMapper hdbPvPoMapper;

    public ApiHdbPvPoServiceImpl() {
        super(HdbPvDto.class);
    }

    @Override
    public PageResultDto<HdbPvDto> searchHdbPvsDsf(SearchHdbPvsConditionDto dto, feihua.jdbc.api.pojo.PageAndOrderbyParamDto pageAndOrderbyParamDto) {
        Page p = super.pageAndOrderbyStart(pageAndOrderbyParamDto);
        List<HdbPvDto> list = this.wrapDtos(hdbPvPoMapper.searchs(dto));
        return new PageResultDto(list, this.wrapPage(p));
    }
}